package com.colortea.service;

import java.util.List;

import com.colortea.action.frontstage.order.OrderObj;
import com.colortea.entity.CartT;
import com.colortea.entity.DeliverAddressT;
import com.colortea.entity.LogisticsBusinessT;
import com.colortea.entity.LogisticsbusinessareaT;
import com.colortea.entity.MemberInvoiceT;
import com.colortea.entity.MemberT;
import com.colortea.entity.OrderInvoiceT;
import com.colortea.entity.OrderT;
import com.colortea.entity.PaymentM;
import com.colortea.entity.ShippingAddressT;

/**
 * 订单生成过程必须调用的方法
 * 
 * @author sdywcd
 *
 */
public interface OrderBaseProcessTService {
	/**
	 * 获取当前用户的所有收货地址
	 * 
	 * @param m
	 * @return
	 */
	public List<DeliverAddressT> getMemberDeliverAddress(MemberT m);

	/**
	 * 获取当前可用的物流商信息
	 * 
	 * @param state
	 * @return
	 */
	public List<LogisticsBusinessT> getLogisticstsBusiness(String state);

	/**
	 * 获取当前可用的支付方式
	 * 
	 * @param state
	 * @return
	 */
	public List<PaymentM> getPaymentM(String state);

	/**
	 * 获取当前用的购物车信息
	 * 
	 * @param memberid
	 * @param state
	 * @param orderTag
	 * @return
	 */
	public List<CartT> getMemberCart(String memberid, String state,
			String orderTag);

	/**
	 * 获取系统默认的物流商
	 * 
	 * @param visiable
	 * @return
	 */
	public List<LogisticsBusinessT> getDefaultLogisticsBusinessT(String visiable);

	/**
	 * 获取系统默认物流商的全过阶梯运费信息
	 * 
	 * @param logisticsid
	 * @return
	 */
	public List<LogisticsbusinessareaT> getDefaultLogisticsbusinessareaT(
			String logisticsid);

	/**
	 * 获取当前选择的支付信息
	 * 
	 * @param paymentid
	 * @return
	 */
	public PaymentM getSelectedPayMent(String paymentid);

	/**
	 * 获取收货地址信息
	 * 
	 * @param addressid
	 * @return
	 */
	public DeliverAddressT getDeliverAddress(String addressid);

	/**
	 * 获取订单信息
	 * 
	 * @param orderid
	 * @return
	 */
	public OrderT getOrder(String orderid);

	/**
	 * 根据收货地址id查询是否有对应的发货地址信息
	 * 
	 * @param deliveraddressid
	 * @param state
	 * @param orderid
	 * @return
	 */
	public ShippingAddressT getShippingAddress(String deliveraddressid,
			String state, String orderid);

	/**
	 * 根据订单获取发货地址
	 * 
	 * @param orderid
	 * @return
	 */
	public List<ShippingAddressT> getShippingAddress(String orderid);

	/**
	 * 获取发票抬头信息
	 * 
	 * @param memberid
	 * @return
	 */
	public List<MemberInvoiceT> getMyInvoice(String memberid);

	/**
	 * 保存前台订单
	 * 
	 * @param ordert
	 * @param sAddressT
	 * @param cartTs
	 * @param orderInvoiceT
	 */
	public OrderObj saveFrontOrder(String deliveraddressid, String paymentid,
			String cartgoodsid, String logisticsid, String freight,
			String customernotes, String isgoodsfromcart, String ordertag,
			String invoiceid,MemberT mt, String defaultbank);

}
